package Structural_design_pattern.Composite_Pattern.Example1;

public abstract class MenuComponent {
    protected String name;
    protected int level;

    //新建子菜单
    public void add(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }

    //删除子菜单
    public void remove(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }

    //获取子菜单
    public MenuComponent getChild(int i){
        throw new UnsupportedOperationException();
    }

    //获取名称
    public String getName(){
        return name;
    }

    public abstract void print();

}
